from django.urls import include, path
from rest_framework.routers import DefaultRouter
from .views import BlogArticleViewSet, LogoutView, LoginView, RegisterView, BlogArticleByAuthorViewSet, \
    BlogCommentsViewSet

router = DefaultRouter()
router.register(r'blog', BlogArticleViewSet)
urlpatterns = [
    path("", include(router.urls)),
    path("user/logout/",LogoutView.as_view(),name="logout"),
    path("user/login/",LoginView.as_view(),name="login"),
    path("user/register/",RegisterView.as_view(),name="register"),
    path("blog_author/",BlogArticleByAuthorViewSet.as_view(),name="blog_author"),
    path("blog/comment/<int:id>/",BlogCommentsViewSet.as_view(),name="blog_comment"),
]